<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Import as Example</title>
</head>
<body>
{# 使用import...as...导入宏 #}
<h1>Using import...as...</h1>

{% import 'forms.html' as forms %}

<form action="/save1" method="post">
<dl>
    <dt>Username</dt>
    <dd>{{ forms.input('username',value=username) }}</dd>
    <dt>Password</dt>
    <dd>{{ forms.input('password',type='password',value=password) }}</dd>
</dl>

    <p>{{ forms.textarea('comment') }}</p>
    <button type="submit">Submit</button>

</form>
</body>
</html>